#define _HEADER_Switch_H

class Switch
{
private:
    /* data */
public:
    //开关类型,水路开关，水泵
    enum SwitchClassEnum {WaterSwitch=1,WaterPump};
    SwitchClassEnum switchClass = WaterSwitch;
    //输出端口
    int port = -1;
    //当前开关状态
    enum SwitchTypeEnum {OPEN=1,CLOSE};
    SwitchTypeEnum state = CLOSE;
public:
    Switch();
    ~Switch();

    //设置开关类型
    void setSwitchClass(SwitchClassEnum inClass);
    //设置输出端口
    void setPort(int port);

    //打开开关
    void open();
    //关闭开关
    void close();
    //打印状态
    void toString(char* inStr);
};